<@override name="title">游戏参与记录</@override>

<@override name="viewbody">
<!-- Page title -->
<div class="row">
    <div class="col-md-12">
        <h3 class="page-title">
            系统统计
            <small>游戏参与记录</small>
        </h3>
        <ul class="page-breadcrumb breadcrumb">
            <li>
                <i class="fa fa-home"></i>
                <a href="${ctx}/admin/home">
                    首页
                </a>
                <i class="fa fa-angle-right"></i>
            </li>
            <li>
                <a href="#">
                    游戏参与记录
                </a>
            </li>
        </ul>
    </div>
</div>
<!-- /page title -->

<div class="row">
    <div class="col-md-12">
        <div class="row ">
            <#list joinStats as s>
                <div class="col-md-6 col-sm-6">
                    <div class="portlet box <#if s_index == 0>purple<#else>blue</#if>">
                        <div class="portlet-title">
                            <div class="caption">
                                <i class="fa fa-calendar"></i> ${s.gameName} 统计
                            </div>
                            <div class="tools">
                                <a href="javascript:;" class="collapse"></a>
                            </div>
                        </div>
                        <div class="portlet-body">
                            <div class="table-responsive">
                                <table class="table table-condensed table-hover" id="game_stat_${s.gameId!}">
                                    <thead>
                                    <tr>
                                        <th style="text-align: right; vertical-align: middle;">参与日期：</th>
                                        <th width="60%">
                                            <div class="input-group date-picker input-daterange">
                                                <input type="text" class="form-control" readonly name="start" value="${start!}">
                                            <span class="input-group-addon">
                                                 到
                                            </span>
                                                <input type="text" class="form-control" readonly name="end" value="${end!}">
                                            </div>
                                        </th>
                                        <th class="tools">
                                            <button type="button" class="btn reload btn-default" data-game="${s.gameId}" name="stat_btn">查询</button>
                                        </th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr class="active">
                                        <td></td>
                                        <td>参与次数</td>
                                        <td name="totalTime">${s.totalTime!}</td>
                                    </tr>
                                    <tr class="success">
                                        <td></td>
                                        <td>参与人数</td>
                                        <td name="totalPeople">${s.totalPeople!}</td>
                                    </tr>
                                    <tr class="warning">
                                        <td></td>
                                        <td>中奖次数</td>
                                        <td name="winingTime">${s.winingTime!}</td>
                                    </tr>
                                    <tr class="danger">
                                        <td></td>
                                        <td>中奖人数</td>
                                        <td><a href="javascript:void(0);" class="label label-sm label-success" name="winingPeople" data-game="${s.gameId}">${s.winingPeople!}</a></td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </#list>
        </div>

        <div class="portlet box light-grey">
            <div class="portlet-title">
                <div class="caption">
                    <i class="fa fa-globe"></i>游戏参与记录一览表
                </div>
            </div>
            <div class="portlet-body">
                <div class="table-toolbar">
                    <form action="#" class="form-inline" id="search_form">
                        <#--<div class="form-group">
                            <label for="start">开始日期:</label>
                            <input type="text" class="form-control date-picker" id="start" name="start">
                        </div>
                        <div class="form-group">
                            <label for="end">结束日期:</label>
                            <input type="text" class="form-control date-picker" id="end" name="end">
                        </div>-->
                        <div class="form-group margin-right-10">
                            <label for="start_time" class="control-label fleft">日期：</label>
                            <div class="input-group input-large date-picker input-daterange" data-date-format="yyyy-mm-dd">
                                <input type="text" class="form-control" id="start" name="start" placeholder="开始日期">
                                <span class="input-group-addon"> 到</span>
                                <input type="text" class="form-control" id="end" name="end" placeholder="结束日期">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="game">游戏:</label>
                            <select id="game" name="game" class="form-control input-sm input-small select2me">
                                <option value="0">请选择</option>
                                <#list games?if_exists as game>
                                    <option value="${game.id!}">${game.name!}</option>
                                </#list>
                            </select>
                        </div>
                        <div class="form-group">
                            <#--<label for="winning">是否中奖:</label>-->
                            <select id="winning" name="winning" class="form-control input-sm input-small select2me" placeholder="是否中奖">
                                <option value="">全部</option>
                                <option value="true">中奖</option>
                                <option value="false">未中奖</option>
                            </select>
                        </div>
                        <div class="form-group">
                            <label for="gift">奖品:</label>
                            <input type="text" class="form-control" id="gift" name="gift">
                        </div>
                        <button class="btn blue filter-submit margin-bottom" id="search_btn">
                            <i class="fa fa-search"></i> 检索
                        </button>
                    </form>
                </div>

                <#--<div class="table-toolbar">
                    <div class="btn-group">
                    </div>
                    <div class="btn-group pull-right">
                        <button class="btn dropdown-toggle" data-toggle="dropdown">其他 <i class="fa fa-angle-down"></i>
                        </button>
                        <ul class="dropdown-menu pull-right">
                            <li>
                                <a href="#">导出Excel
                                </a>
                            </li>
                        </ul>
                    </div>
                </div>-->

                <table class="table table-striped table-bordered table-hover" id="data-list">
                    <thead>
                    <tr>
                        <th width="30"><input type="checkbox" name="checkall"></th>
                        <th width="50">序号</th>
                        <th>时间</th>
                        <th>游戏</th>
                        <th>会员名称</th>
                        <th>会员号</th>
                        <th>手机号</th>
                        <th>是否中奖</th>
                        <th>奖品名称</th>
                        <th>是否领取</th>
                        <th>领取时间</th>
                    </tr>
                    </thead>
                    <tbody>

                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>

<script id="winning_template" type="text/x-handlebars-template">
    {{#if winning}}
        <span class="label label-sm label-success">中奖</span>
    {{else}}
        <span class="label label-sm label-warning">未中奖</span>
    {{/if}}
</script>

<script id="rece_template" type="text/x-handlebars-template">
    {{#if receive}}
        <span class="label label-sm label-success">领取</span>
    {{else}}
        <span class="label label-sm label-warning">未领取</span>
    {{/if}}
</script>

</@override>
<@override name="viewparams">
g.winningTpl = '#winning_template';
g.receTpl = '#rece_template';
</@override>
<@override name="viewmodule">game_record</@override>
<@extends name="../../_basic/main.ftl"></@extends>

